<?php
namespace App\Services;
use Validator;
//基础service  一些公共的方法的基类
class CommonService
{
    //检验搜索的值
    public function checkSou($arr)
    {
        $validate = [
            //规则
            'rule' => [
                'sou' => 'required | max:20 ',
            ]
        ];
        $validator = Validator::make($arr, $validate['rule']);
        if ($validator->fails())
        {
            return false;
        }
        else{
            return true;
        }
    }
}